package com.hashmap1;

import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class PropertyToHashmap {
public static void main(String[] args) {
	Properties p=new Properties();
	p.setProperty("key1", "value1");
	p.setProperty("key2", "value2");
	p.setProperty("key3", "value3");
	p.setProperty("key4", "value4");
	Map<String, String> map=new HashMap<String, String>((Map)p);
	Set key=map.entrySet();
	for(Object obj:key){
		Map.Entry entry=(Map.Entry)obj;
		System.out.println(entry.getKey() +"\t"+entry.getValue());
	}
}
}
